package com.cpfmat.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.cpfmat.entity.SystemUser;
import com.cpfmat.mapper.SystemUserMapper;
import com.cpfmat.service.ISystemUserService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangbin
 * @since 2018-07-30
 */
@Service
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements ISystemUserService {
	@Autowired
	private SystemUserMapper systemUserMapper;

	@Override
	public int customUpdate(SystemUser user) {
		return systemUserMapper.customUpdate(user);
	}

	@Override
	public SystemUser checkLoing(String loginName, String loginPwd) {
		SystemUser user = new SystemUser();
		user.setLoginName(loginName);
		user.setLoginPwd(loginPwd);
		user.setDelFlag(0);
		
		return systemUserMapper.selectOne(user);
	}
	
	
}
